Optimal. Leaf size=83 \[ \frac {5}{8} a c^3 x+\frac {5 a c^3 \cos ^3(e+f x)}{12 f}+\frac {5 a c^3 \cos (e+f x) \sin (e+f x)}{8 f}+\frac {a \cos ^3(e+f x) \left (c^3-c^3 \sin (e+f x)\right )}{4 f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.08, antiderivative size = 83, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.208, Rules used = {2815, 2757,
2748, 2715, 8} \begin {gather*} \frac {5 a c^3 \cos ^3(e+f x)}{12 f}+\frac {a \cos ^3(e+f x) \left (c^3-c^3 \sin (e+f x)\right )}{4 f}+\frac {5 a c^3 \sin (e+f x) \cos (e+f x)}{8 f}+\frac {5}{8} a c^3 x \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2715
Rule 2748
Rule 2757
Rule 2815
Rubi steps
\begin {align*} \int (a+a \sin (e+f x)) (c-c \sin (e+f x))^3 \, dx &=(a c) \int \cos ^2(e+f x) (c-c \sin (e+f x))^2 \, dx\\ &=\frac {a \cos ^3(e+f x) \left (c^3-c^3 \sin (e+f x)\right )}{4 f}+\frac {1}{4} \left (5 a c^2\right ) \int \cos ^2(e+f x) (c-c \sin (e+f x)) \, dx\\ &=\frac {5 a c^3 \cos ^3(e+f x)}{12 f}+\frac {a \cos ^3(e+f x) \left (c^3-c^3 \sin (e+f x)\right )}{4 f}+\frac {1}{4} \left (5 a c^3\right ) \int \cos ^2(e+f x) \, dx\\ &=\frac {5 a c^3 \cos ^3(e+f x)}{12 f}+\frac {5 a c^3 \cos (e+f x) \sin (e+f x)}{8 f}+\frac {a \cos ^3(e+f x) \left (c^3-c^3 \sin (e+f x)\right )}{4 f}+\frac {1}{8} \left (5 a c^3\right ) \int 1 \, dx\\ &=\frac {5}{8} a c^3 x+\frac {5 a c^3 \cos ^3(e+f x)}{12 f}+\frac {5 a c^3 \cos (e+f x) \sin (e+f x)}{8 f}+\frac {a \cos ^3(e+f x) \left (c^3-c^3 \sin (e+f x)\right )}{4 f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.26, size = 54, normalized size = 0.65 \begin {gather*} \frac {a c^3 (60 f x+48 \cos (e+f x)+16 \cos (3 (e+f x))+24 \sin (2 (e+f x))-3 \sin (4 (e+f x)))}{96 f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.24, size = 89, normalized size = 1.07
method | result | size |
risch | \(\frac {5 a \,c^{3} x}{8}+\frac {a \,c^{3} \cos \left (f x +e \right )}{2 f}-\frac {a \,c^{3} \sin \left (4 f x +4 e \right )}{32 f}+\frac {a \,c^{3} \cos \left (3 f x +3 e \right )}{6 f}+\frac {a \,c^{3} \sin \left (2 f x +2 e \right )}{4 f}\) | \(78\) |
derivativedivides | \(\frac {-a \,c^{3} \left (-\frac {\left (\sin ^{3}\left (f x +e \right )+\frac {3 \sin \left (f x +e \right )}{2}\right ) \cos \left (f x +e \right )}{4}+\frac {3 f x}{8}+\frac {3 e}{8}\right )-\frac {2 a \,c^{3} \left (2+\sin ^{2}\left (f x +e \right )\right ) \cos \left (f x +e \right )}{3}+2 a \,c^{3} \cos \left (f x +e \right )+a \,c^{3} \left (f x +e \right )}{f}\) | \(89\) |
default | \(\frac {-a \,c^{3} \left (-\frac {\left (\sin ^{3}\left (f x +e \right )+\frac {3 \sin \left (f x +e \right )}{2}\right ) \cos \left (f x +e \right )}{4}+\frac {3 f x}{8}+\frac {3 e}{8}\right )-\frac {2 a \,c^{3} \left (2+\sin ^{2}\left (f x +e \right )\right ) \cos \left (f x +e \right )}{3}+2 a \,c^{3} \cos \left (f x +e \right )+a \,c^{3} \left (f x +e \right )}{f}\) | \(89\) |
norman | \(\frac {\frac {4 a \,c^{3}}{3 f}+\frac {5 a \,c^{3} x}{8}+\frac {4 a \,c^{3} \left (\tan ^{6}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f}+\frac {4 a \,c^{3} \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{3 f}+\frac {4 a \,c^{3} \left (\tan ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f}+\frac {3 a \,c^{3} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{4 f}+\frac {11 a \,c^{3} \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{4 f}-\frac {11 a \,c^{3} \left (\tan ^{5}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{4 f}-\frac {3 a \,c^{3} \left (\tan ^{7}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{4 f}+\frac {5 a \,c^{3} x \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2}+\frac {15 a \,c^{3} x \left (\tan ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{4}+\frac {5 a \,c^{3} x \left (\tan ^{6}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2}+\frac {5 a \,c^{3} x \left (\tan ^{8}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{8}}{\left (1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )^{4}}\) | \(244\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.31, size = 93, normalized size = 1.12 \begin {gather*} \frac {64 \, {\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} a c^{3} - 3 \, {\left (12 \, f x + 12 \, e + \sin \left (4 \, f x + 4 \, e\right ) - 8 \, \sin \left (2 \, f x + 2 \, e\right )\right )} a c^{3} + 96 \, {\left (f x + e\right )} a c^{3} + 192 \, a c^{3} \cos \left (f x + e\right )}{96 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.33, size = 67, normalized size = 0.81 \begin {gather*} \frac {16 \, a c^{3} \cos \left (f x + e\right )^{3} + 15 \, a c^{3} f x - 3 \, {\left (2 \, a c^{3} \cos \left (f x + e\right )^{3} - 5 \, a c^{3} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{24 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 196 vs.
\(2 (78) = 156\).
time = 0.21, size = 196, normalized size = 2.36 \begin {gather*} \begin {cases} - \frac {3 a c^{3} x \sin ^{4}{\left (e + f x \right )}}{8} - \frac {3 a c^{3} x \sin ^{2}{\left (e + f x \right )} \cos ^{2}{\left (e + f x \right )}}{4} - \frac {3 a c^{3} x \cos ^{4}{\left (e + f x \right )}}{8} + a c^{3} x + \frac {5 a c^{3} \sin ^{3}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{8 f} - \frac {2 a c^{3} \sin ^{2}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{f} + \frac {3 a c^{3} \sin {\left (e + f x \right )} \cos ^{3}{\left (e + f x \right )}}{8 f} - \frac {4 a c^{3} \cos ^{3}{\left (e + f x \right )}}{3 f} + \frac {2 a c^{3} \cos {\left (e + f x \right )}}{f} & \text {for}\: f \neq 0 \\x \left (a \sin {\left (e \right )} + a\right ) \left (- c \sin {\left (e \right )} + c\right )^{3} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.44, size = 81, normalized size = 0.98 \begin {gather*} \frac {5}{8} \, a c^{3} x + \frac {a c^{3} \cos \left (3 \, f x + 3 \, e\right )}{6 \, f} + \frac {a c^{3} \cos \left (f x + e\right )}{2 \, f} - \frac {a c^{3} \sin \left (4 \, f x + 4 \, e\right )}{32 \, f} + \frac {a c^{3} \sin \left (2 \, f x + 2 \, e\right )}{4 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 9.00, size = 250, normalized size = 3.01 \begin {gather*} \frac {5\,a\,c^3\,x}{8}-\frac {{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2\,\left (\frac {a\,c^3\,\left (15\,e+15\,f\,x\right )}{6}-\frac {a\,c^3\,\left (60\,e+60\,f\,x+32\right )}{24}\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6\,\left (\frac {a\,c^3\,\left (15\,e+15\,f\,x\right )}{6}-\frac {a\,c^3\,\left (60\,e+60\,f\,x+96\right )}{24}\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4\,\left (\frac {a\,c^3\,\left (15\,e+15\,f\,x\right )}{4}-\frac {a\,c^3\,\left (90\,e+90\,f\,x+96\right )}{24}\right )-\frac {3\,a\,c^3\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}{4}-\frac {11\,a\,c^3\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3}{4}+\frac {11\,a\,c^3\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^5}{4}+\frac {3\,a\,c^3\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^7}{4}+\frac {a\,c^3\,\left (15\,e+15\,f\,x\right )}{24}-\frac {a\,c^3\,\left (15\,e+15\,f\,x+32\right )}{24}}{f\,{\left ({\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+1\right )}^4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________